package com.thssh.ui.other.service;

import android.app.Service;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Binder;
import android.os.IBinder;
import android.util.Log;

public class BindService extends Service {

    public class ServiceBinder extends Binder{
        public BindService service(){
            return BindService.this;
        }
    }

    public BindService() {
    }

    @Override
    public IBinder onBind(Intent intent) {
        Log.d("BindService", "onBind: ");
        return new ServiceBinder();
    }

    @Override
    public void unbindService(ServiceConnection conn) {
        Log.d("BindService", "unbindService: ");
        super.unbindService(conn);
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Log.d("BindService", "onUnbind: ");
        return super.onUnbind(intent);
    }

    @Override
    public void onCreate() {
        super.onCreate();
        Log.d("BindService", "onCreate: ");
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.d("BindService", "onStartCommand: ");
        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Log.d("BindService", "onDestroy: ");
    }

    @Override
    public void onRebind(Intent intent) {
        super.onRebind(intent);
        Log.d("BindService", "onRebind: ");
    }
}
